/******** home.js start ******/
$(function() {
    var tap = "ontouchstart" in document ? "touchend" : "click";

});
<<<<<<< HEAD
var homeSwiper = new Swiper(".home-swiper", {
    observer: true,
    observeParents: true,
    // slidesPerView: 1,
    slidesPerView: 'auto',
    speed: 1000,
    height:'auto',
    // autoHeight: true,
    direction: "vertical",
    spaceBetween: 0,
    mousewheel: true,
    pagination: {
      el: ".swiper-pagination",
      clickable: true,
    },
    on: {
        slideNextTransitionStart: function(){
        //   console.log("上滚");
          $("body").addClass("page-down")
        },
        slidePrevTransitionStart: function(swiper){
            // console.log('下滚');
            $("body").removeClass("page-down")
        },
        slideChangeTransitionStart: function() {
            //  alert(this.activeIndex);
            var $slide = $(this.slides[this.activeIndex]);
            $slide.addClass('active-X')
                .siblings().removeClass('active-X');
            $slide.find('.slide-home2-end .list .item').addClass('queenAll')
            // .end()
            // .siblings().find('.list .item').removeClass('queenAll');
        },
    },
=======
var windowWidth = $(window).width()

if (windowWidth > 992) {
    var homeSwiper = new Swiper(".home-swiper", {
        observer: true,
        observeParents: true,
        // slidesPerView: 1,
        slidesPerView: 'auto',
        speed: 1000,
        // height: 'auto',
        // height: 100,
        direction: "vertical",
        // slidesPerView: 'auto',
        spaceBetween: 0,
        mousewheel: true,
        pagination: {
            el: ".home-swiper-pagination",
            clickable: true,
        },
        on: {
            slideNextTransitionStart: function() {
                //   console.log("上滚");
                $("body").addClass("page-down")
            },
            slidePrevTransitionStart: function(swiper) {
                // console.log('下滚');
                $("body").removeClass("page-down")
            },
            slideChangeTransitionStart: function() {
                // alert(this.activeIndex);
                var $slide = $(this.slides[this.activeIndex]);
                $slide.addClass('active-X')
                    .siblings().removeClass('active-X');


                // if (this.activeIndex = 1) {
                $slide.find('.list .item').addClass('queenAll')
                    .end()
                    .siblings().find('.list .item').removeClass('queenAll');
                // }

            },
            // slideChangeTransitionEnd: function() {
            //     var $slide = $(this.slides[this.activeIndex]);
            //     $slide.find(".jumpNum-one").addClass("jumpNum")
            // }
        },
    });
}
>>>>>>> b73c1686454a366e0727d2aae6dfeed6ae54399b



var home1N = new Swiper(".home1-slide-n", {
    // loop: true,
    // cssMode: true,
    // speed: 500,
    watchOverflow: true,
    slidesPerView: 1,
    autoplay: {
        delay: 5000,
        stopOnLastSlide: false,
        disableOnInteraction: true,
    },
    observer: true,
    observeParents: true,
    // mousewheel: false,

    // effect: 'fade',
    navigation: {
        nextEl: ".home1-slide-n-next",
        prevEl: ".home1-slide-n-prev",
    },
    pagination: {
        el: ".home1-slide-n-pagination",
        clickable: true,
        renderBullet: function(index, className) {
            return '<span class="' + className + '">' + "<span class='add-pagination'>" + (index + 1) + '</span>' + '<span class="add-pagination1">' + '</span>' + "</span>";
        },
    },
    // mousewheel: true,
    // keyboard: true,
    on: {
        init: function() {
            $('.slide-home1 .swiper-slide').eq(0).find('.bd').addClass('homeAni')
        },
        // slideChangeTransitionStart: function() {
        //     $(".home1-slide-n .swiper-pagination-bullet-active").append("<span></span>").siblings().remove("<span></span>")
        // },
        slideChangeTransitionEnd: function() {
            //  alert(this.activeIndex);
            var $slide = $(this.slides[this.activeIndex]);
            $slide.find('.bd').addClass('homeAni')
                .end()
                .siblings().find('.bd').removeClass('homeAni');
        },
    }
});


var home3N = new Swiper(".home3-slide-n", {
    observer: true,
    observeParents: true,
    effect: 'fade',
    loop: true,
    speed: 500,
    watchOverflow: true,
    slidesPerView: 1,
    autoplay: {
        delay: 3000,
        stopOnLastSlide: true,
        disableOnInteraction: false,
    },
    pagination: {
        el: ".home3-slide-n-pagination",
    },
    mousewheel: true,
    keyboard: true,
    on: {
        init: function() {
            $('.slide-home3 .swiper-slide').eq(0).find('.tti').addClass('queenAll')
            $('.slide-home3 .swiper-slide').eq(0).find('.doc').addClass('queenAll')
        },
        slideChangeTransitionEnd: function() {
            var $slide = $(this.slides[this.activeIndex]);
            $slide.find(".bd .tit").addClass("queenAll")
                .end()
                .siblings().find(".bd .tit").removeClass('queenAll');

            $slide.find(".bd .doc").addClass("queenAll")
                .end()
                .siblings().find(".bd .doc").removeClass('queenAll');

            $slide.find(".bgk").addClass("bgk-err")
                .end()
                .siblings().find(".bgk").removeClass('bgk-err');
        },
        slideChangeTransitionStart: function() {
            $('.progress-bar1 .item').eq(this.realIndex).addClass('active').siblings().removeClass('active')
        },
    }
});

var home5N = new Swiper(".home5-slide-n", {
    observer: true,
    observeParents: true,
    // loop: true,
    watchOverflow: true,
    slidesPerView: 5,
    spaceBetween: 50,
    autoplay: {
        delay: 3000,
        stopOnLastSlide: true,
        disableOnInteraction: false,
    },
    breakpoints: {
        0: {
            slidesPerView: 3,
            spaceBetween: 20,
        },
        992: {
            slidesPerView: 5,
            spaceBetween: 50,
        },
    },
    pagination: {
        el: ".home5-slide-n-pagination",
    },
});

// 公告公示
$('.slide-home6 .top .right .item').on('click', function() {
    $(this).addClass('active').siblings().removeClass('active')

    $('.slide-home6 .end .right').eq($(this).index()).css('display', 'block').animate({
        'opacity': '1',
        'display': 'block'
    }).siblings().css({
        'opacity': '0',
        'display': 'none'
    })
})